Partial rendering is useful in 3D scenes that require only partial updating. You can use this mechanism to reduce load in the fragment shading units.
An example where partial rendering can offer significant performance benefits is a clock where only the hands of the clock are updated, while all the other parts remain static. With the hands covering a 100 by 100 pixel area and at the resolution of the application is 800 by 480 pixels, partial rendering discards about 97% of the fragments.
Note that partial rendering is a tradeoff between the GPU render time and CPU evaluation time. When using partial rendering you will notice an increase in performance in your application only when the GPU render time is prohibitively long (for example, when you use complex shaders).
Partial rendering does not provide advantages when the scene is not fill-rate bound. In such cases using partial rendering creates a small overhead for rendering the stencils. Additionally, a user interface presenting a full 3D environment from a moving camera cannot gain from partial rendering since all fragments must be processed when the camera moves.
To detect whether the applications is fill-rate bound or not, you can override all shaders with a simple fragment shader and see if there is any impact. Many GPU vendors also provide external profiling tools for detecting pipeline bottlenecks.
On mobile and embedded GPU the workload of the GPU consist of state switches, sending draw calls (triangles, buffer clearings), sending textures and shaders to GPU, and finally processing the fragments. With improving display resolutions, the amount of fragment processing keeps increasing while other stages of the rendering pipeline remain constant. Therefore the shader pipeline is often the bottleneck you need to optimize. In many user interfaces, you can limit the number of dynamic objects. Only certain objects move, and most of the fragments retain the color values from previous frames. Normally, all fragments are still processed each frame on the GPU. In Kanzi you can use partial rendering mechanism to discard processing of static pixels.
The GPU provides a stencil test stage, which is performed before the fragment shader program through Early-Z mechanism. If the test fails, the program is not processed further. In Kanzi Studio you apply partial rendering by using Partial Rendering Layer and Partial Rendering Composer. These components detect changes in properties that affect the rendering. An extra render pass is required for writing stencil value for changed 3D objects or layers. See Using partial rendering layers.
All the dynamic objects pass the stencil test from the bounding volume area, while static objects are mostly masked away. This gives significant performance improvements in cases, where the fragment shader is the bottleneck and when the majority of fragments are static.
Using partial rendering layers
Optimizing rendering of layouts
Setting layers for efficient rendering
Preventing overdraw with sorting filters